<para>
A list of modules to load in addition to those specified in the
-<envar>GTK_MODULES</envar> environment variable and the
+<envar>GTK3_MODULES</envar> environment variable and the
<literal>gtk-modules</literal> setting.
</para>
</formalpara>
</formalpara>
<formalpara>
- <title><envar>GTK_MODULES</envar></title>
+ <title><envar>GTK3_MODULES</envar></title>
<para>
A list of modules to load. Note that GTK+ also allows to specify modules to load via a commandline option (<option>--gtk-module</option>) and with the <literal>gtk-modules</literal> setting.
</para>
+</formalpara>
+
+<formalpara>
+ <title><envar>GTK_MODULES</envar></title>
+
+ <para>
+ A list of modules to load in addition to the ones in the <envar>GTK3_MODULES</envar> variable.
+ </para>
<warning>
Note that this environment variable is read by GTK+ 2.x too,
which may not have the same set of modules available for loading.
+ Use <envar>GTK3_MODULES</envar> for modules that are only compatible
+ with GTK+ 3.
</warning>
</formalpara>
}
#endif /* G_ENABLE_DEBUG */
- env_string = g_getenv ("GTK_MODULES");
+ env_string = g_getenv ("GTK3_MODULES");
if (env_string)
gtk_modules_string = g_string_new (env_string);
+
+ env_string = g_getenv ("GTK_MODULES");
+ if (env_string)
+ {
+ if (gtk_modules_string)
+ g_string_append_c (gtk_modules_string, G_SEARCHPATH_SEPARATOR);
+ else
+ gtk_modules_string = g_string_new (NULL);
+
+ g_string_append (gtk_modules_string, env_string);
+ }
}
static void